import BaseHttp from "./BaseHttp"

export default class NewsCategory extends BaseHttp{
    constructor(){
        super()//在构造函数中使用父类的构造函数
    }

    //Get所有的NewsCategory
    async getNewsCategories(url){
       return (await this.get(url)).data
    }

    // Get前Count个NewsCategory
    async getNewsCategoriesByCount(url,count){
        let targetUrl=url+'/'+count;
        return (await this.get(targetUrl)).data
    }

    // Get到指定id的NewsCategory
    async getNewsCategory(id){
        let targetUrl='NewsCategories/NewsCategory/'+id;
        return (await this.get(targetUrl)).data
    }

}
